package com.project.common.tag;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;

import com.opensymphony.xwork2.util.ValueStack;
/**
 * 主页上显示的新闻的title
 * 
 */
public class NewsTitleTag extends ComponentTagSupport 
{
	/**
     * 
     */
	private static final long serialVersionUID = 1L;
	// 属于菜单的menuId
	private String menuId = null;
	// list显示几笔
	private String recordCount = null;
	// 课程显示的div层1-24
	private String count = null;
	// 类别，course:课程
	private String type = null;
	
	@Override
	//先执行此方法，然后在执行populateparams方法
	public Component getBean(ValueStack vs, HttpServletRequest request,HttpServletResponse response) 
	{
		return new NewsTitle(vs, request);
		
	}
	
	//初始化数据
	protected void populateParams() 
	{
		super.populateParams();
		NewsTitle nt = (NewsTitle) component;
		nt.setMenuId(menuId);
		nt.setCount(count);
		nt.setRecordCount(recordCount);
		nt.setType(type);
	}

	/**
	 * Release any acquired resources.
	 */
	public void release() {
		super.release();
	}

	public String getMenuId() {
		return menuId;
	}

	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}

	public String getCount() {
		return count;
	}

	public void setCount(String count) {
		this.count = count;
	}

	public String getRecordCount() {
		return recordCount;
	}

	public void setRecordCount(String recordCount) {
		this.recordCount = recordCount;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

}
